<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>hexo后记 | 净土</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="A blog of howiefh.">
<meta property="og:type" content="article">
<meta property="og:title" content="hexo后记">
<meta property="og:url" content="http://howiefh.github.io/2014/02/07/hexo-note/index.html">
<meta property="og:site_name" content="净土">
<meta property="og:description" content="A blog of howiefh.">
<meta property="og:updated_time" content="2014-12-24T07:44:51.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hexo后记">
<meta name="twitter:description" content="A blog of howiefh.">
  
    <link rel="alternative" href="/atom.xml" title="净土" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.ico">
  
  <link href="http://fonts.useso.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-40492061-1', 'auto');
ga('send', 'pageview');

</script>


  
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?56d2899c5e919fbf4a7b00de5d1c31dd";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">净土</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">乐不在外而在心，心以为乐，则是境皆乐；心以为苦，则无境不苦。</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-github-link" class="nav-icon" href="https://github.com/howiefh" title="Github" target="_blank"></a>
        
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed" target="_blank"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://howiefh.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-hexo-note" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    
<a href="/2014/02/07/hexo-note/" class="article-date">
  <time datetime="2014-02-07T02:15:39.000Z" itemprop="datePublished">2014-02-07</time>
</a>


    
  <div class="article-category">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      hexo后记
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
		
		<div id="toc" class="toc-article">
			<h2 class="toc-title"><span>Contents</span></h2>
		
			<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#设置google_analytics"><span class="toc-number">1.</span> <span class="toc-text">设置google analytics</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#sitemap"><span class="toc-number">2.</span> <span class="toc-text">sitemap</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#rss"><span class="toc-number">3.</span> <span class="toc-text">rss</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#添加菜单"><span class="toc-number">4.</span> <span class="toc-text">添加菜单</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改新建post的框架"><span class="toc-number">5.</span> <span class="toc-text">修改新建post的框架</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改widgets"><span class="toc-number">6.</span> <span class="toc-text">修改widgets</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#创建文件后在编辑器中打开"><span class="toc-number">7.</span> <span class="toc-text">创建文件后在编辑器中打开</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#read_more"><span class="toc-number">8.</span> <span class="toc-text">read more</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#重新部署问题"><span class="toc-number">9.</span> <span class="toc-text">重新部署问题</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#pagination设置"><span class="toc-number">10.</span> <span class="toc-text">pagination设置</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#widget增加日历"><span class="toc-number">11.</span> <span class="toc-text">widget增加日历</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#site_post_使用示例"><span class="toc-number">12.</span> <span class="toc-text">site post 使用示例</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#返回顶部"><span class="toc-number">13.</span> <span class="toc-text">返回顶部</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改header样式"><span class="toc-number">14.</span> <span class="toc-text">修改header样式</span></a></li></ol>
		
		</div>
		
        <h1 id="设置google_analytics">设置google analytics</h1><p>在themes/light/_config.yml中添加<br>google_analytics: [id]<br>这里的id填上你自己的谷歌分析的id即可，比如：<code>UA-********-*</code></p>
<a id="more"></a>
<h1 id="sitemap">sitemap</h1><p>安装<br><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm <span class="operator"><span class="keyword">install</span> hexo-generator-sitemap <span class="comment">--save</span></span></span><br></pre></td></tr></table></figure></p>
<p>激活<br>在 <code>_config.yml</code> 中 <code>plugins</code> 下添加 <code>hexo-generator-sitemap</code><br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">plugins:&#10;- hexo-generator-sitemap</span><br></pre></td></tr></table></figure></p>
<h1 id="rss">rss</h1><p>安装<br><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm <span class="operator"><span class="keyword">install</span> hexo-generator-feed <span class="comment">--save</span></span></span><br></pre></td></tr></table></figure></p>
<p>激活<br>在 <code>_config.yml</code> 中 <code>plugins</code> 下添加 <code>hexo-generator-feed</code><br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">plugins:&#10;- hexo-generator-feed</span><br></pre></td></tr></table></figure></p>
<p>在themes/light/_config.yml中添加<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">menu:&#10;  RSS: /atom.xml</span><br></pre></td></tr></table></figure></p>
<h1 id="添加菜单">添加菜单</h1><p>themes/light/_config.yml<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">menu:&#10;   Home: /&#10;   Archives: /archives&#10;   GitHub: https://github.com/howiefh</span><br></pre></td></tr></table></figure></p>
<h1 id="修改新建post的框架">修改新建post的框架</h1><p>scaffolds/post.md<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">title: &#123;&#123; title &#125;&#125;</span><br><span class="line">date: &#123;&#123; date &#125;&#125;</span><br><span class="line">categories:</span><br><span class="line"><span class="header">tags:</span><br><span class="line">---</span></span><br></pre></td></tr></table></figure></p>
<h1 id="修改widgets">修改widgets</h1><p>themes/light/_config.yml<br><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">widgets: &#10; - search&#10; - category&#10; - tag&#10; - twitter&#10; - tagcloud&#10; - recent_posts</span><br></pre></td></tr></table></figure></p>
<h1 id="创建文件后在编辑器中打开">创建文件后在编辑器中打开</h1><p>scripts/autoOpenNewPost.js<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> spawn = <span class="built_in">require</span>(<span class="string">'child_process'</span>).spawn;</span><br><span class="line"></span><br><span class="line">hexo.on(<span class="string">'new'</span>, <span class="function"><span class="keyword">function</span>(<span class="params">target</span>)</span>&#123;</span><br><span class="line">	spawn(<span class="string">'gvim'</span>, [target]);</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<p>使用<code>hexo new &quot;title&quot;</code>新建后会调用gvim打开新建的文件</p>
<h1 id="read_more">read more</h1><p>文章中添加<code>&lt;!--more--&gt;</code>可以实现read more功能。</p>
<h1 id="重新部署问题">重新部署问题</h1><p>修改后无法部署到github 删除 .deploy<br>删除tags 需要删除db.json</p>
<h1 id="pagination设置">pagination设置</h1><p>分页，设置每页显示10篇，archive，tag，category都激活每页10篇<br><figure class="highlight http"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">per_page</span>: <span class="string">10</span></span><br><span class="line"></span><br><span class="line"><span class="vala"><span class="preprocessor"># Archives</span></span><br><span class="line"><span class="preprocessor">## 2: Enable pagination</span></span><br><span class="line"><span class="preprocessor">## 1: Disable pagination</span></span><br><span class="line"><span class="preprocessor">## 0: Fully Disable</span></span><br><span class="line">archive: <span class="number">2</span></span><br><span class="line">category: <span class="number">2</span></span><br><span class="line">tag: <span class="number">2</span></span></span><br></pre></td></tr></table></figure></p>
<h1 id="widget增加日历">widget增加日历</h1><p>themes/light/layout/_widget/calendar.ejs<br><figure class="highlight vbscript-html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"><span class="tag">&lt;<span class="title">div</span> <span class="attribute">class</span>=<span class="value">"widget tag"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="title">h3</span> <span class="attribute">class</span>=<span class="value">"title"</span>&gt;</span>Calendar<span class="tag">&lt;/<span class="title">h3</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="title">div</span> <span class="attribute">class</span>=<span class="value">"Calendar"</span>&gt;</span></span><br><span class="line">	  <span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"idCalendarPre"</span>&gt;</span>&amp;lt;&amp;lt;<span class="tag">&lt;/<span class="title">div</span>&gt;</span></span><br><span class="line">	  <span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"idCalendarNext"</span>&gt;</span>&amp;gt;&amp;gt;<span class="tag">&lt;/<span class="title">div</span>&gt;</span></span><br><span class="line">	  <span class="tag">&lt;<span class="title">span</span> <span class="attribute">id</span>=<span class="value">"idCalendarYear"</span>&gt;</span>2008<span class="tag">&lt;/<span class="title">span</span>&gt;</span>年<span class="tag">&lt;<span class="title">span</span> <span class="attribute">id</span>=<span class="value">"idCalendarMonth"</span>&gt;</span>8<span class="tag">&lt;/<span class="title">span</span>&gt;</span>月</span><br><span class="line">	  <span class="tag">&lt;<span class="title">table</span> <span class="attribute">cellspacing</span>=<span class="value">"0"</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="title">thead</span>&gt;</span></span><br><span class="line">		  <span class="tag">&lt;<span class="title">tr</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>日<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>一<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>二<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>三<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>四<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>五<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">			<span class="tag">&lt;<span class="title">td</span>&gt;</span>六<span class="tag">&lt;/<span class="title">td</span>&gt;</span></span><br><span class="line">		  <span class="tag">&lt;/<span class="title">tr</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;/<span class="title">thead</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="title">tbody</span> <span class="attribute">id</span>=<span class="value">"idCalendar"</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;/<span class="title">tbody</span>&gt;</span></span><br><span class="line">	  <span class="tag">&lt;/<span class="title">table</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="title">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="title">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="title">script</span> <span class="attribute">language</span>=<span class="value">"JavaScript"</span>&gt;</span><span class="javascript"></span><br><span class="line"><span class="keyword">var</span> cale = <span class="keyword">new</span> Calendar(<span class="string">"idCalendar"</span>, &#123;</span><br><span class="line">	<span class="comment">//howiefh</span></span><br><span class="line">	<span class="comment">/* SelectDay: new Date().setDate(10), */</span></span><br><span class="line">	SelectDay: <span class="keyword">new</span> <span class="built_in">Date</span>().setDate(<span class="keyword">this</span>.Date),</span><br><span class="line">	onSelectDay: <span class="function"><span class="keyword">function</span>(<span class="params">o</span>)</span>&#123; o.className = <span class="string">"onSelect"</span>; &#125;,</span><br><span class="line">	<span class="comment">//howiefh</span></span><br><span class="line">    onToday: <span class="function"><span class="keyword">function</span>(<span class="params">o</span>)</span>&#123; o.className = <span class="string">"onToday"</span>; &#125;,</span><br><span class="line">    onFinish: <span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">		<span class="comment">//howiefh</span></span><br><span class="line">        <span class="comment">// $("idCalendarYear").innerHTML = this.Year; $("idCalendarMonth").innerHTML = this.Month;</span></span><br><span class="line">		$(<span class="string">"idCalendarYear"</span>).innerHTML = <span class="string">"&lt;a href='</span></span></span><span class="vbscript">&lt;%= config.root %&gt;</span><span class="xml"><span class="scilab"><span class="string">" + "</span>archives/<span class="string">" + this.Year + "</span>/<span class="string">'&gt;"</span> + <span class="transposed_variable">this.</span>Year + <span class="string">" "</span>+ <span class="string">"&lt;/a&gt;"</span>; </span><br><span class="line">		<span class="keyword">if</span> (<span class="transposed_variable">this.</span>Month &lt; <span class="number">10</span>) &#123;</span><br><span class="line">			$(<span class="string">"idCalendarMonth"</span>).innerHTML = <span class="string">"&lt;a href='</span></span></span><span class="vbscript">&lt;%= config.root %&gt;</span><span class="xml"><span class="scilab"><span class="string">" + "</span>archives/<span class="string">" + this.Year + "</span>/<span class="string">" + "</span><span class="number">0</span><span class="string">" + this.Month + "</span>/<span class="string">'&gt;"</span> + <span class="string">" "</span> + <span class="transposed_variable">this.</span>Month + <span class="string">" "</span> + <span class="string">"&lt;/a&gt;"</span>;</span><br><span class="line">		&#125; <span class="keyword">else</span> &#123;</span><br><span class="line">			$(<span class="string">"idCalendarMonth"</span>).innerHTML = <span class="string">"&lt;a href='</span></span></span><span class="vbscript">&lt;%= config.root %&gt;</span><span class="xml"><span class="fsharp"><span class="string">" + "</span>archives/<span class="string">" + this.Year + "</span>/<span class="string">" + this.Month + "</span>/'&gt;<span class="string">" + "</span> <span class="string">" + this.Month + "</span> <span class="string">" + "</span>&lt;/a&gt;<span class="string">";</span><br><span class="line">		&#125;</span><br><span class="line"></span><br><span class="line">		// var flag = [10,15,20]; </span><br><span class="line">		// for(var i = 0, len = flag.length; i &lt; len; i++)&#123; </span><br><span class="line">			// this.Days[flag[i]].innerHTML = "</span>&lt;a href='javascript:<span class="keyword">void</span>(<span class="number">0</span>);' onclick=\<span class="string">"alert('日期是:"</span>+this.Year+<span class="string">"/"</span>+this.Month+<span class="string">"/"</span>+flag[i]+<span class="string">"');return false;\"&gt;"</span> + flag[i] + <span class="string">"&lt;/a&gt;"</span>; </span><br><span class="line">		<span class="comment">// &#125; </span></span><br><span class="line"></span><br><span class="line">		</span></span><span class="vbscript">&lt;% site.posts.<span class="keyword">each</span>(<span class="keyword">function</span>(post)&#123; %&gt;</span><span class="xml"><span class="javascript"></span><br><span class="line">			<span class="keyword">var</span> postdate = <span class="keyword">new</span> <span class="built_in">Date</span>(<span class="string">"</span></span></span><span class="vbscript">&lt;%= post.<span class="built_in">date</span> %&gt;</span><span class="xml"><span class="1c"><span class="string">"); </span></span><br><span class="line">			if (postdate.getFullYear() == this.Year &amp;&amp; postdate.getMonth()+<span class="number">1</span> == this.Month) &#123; </span><br><span class="line">				var day = postdate.getDate();</span><br><span class="line">				this.Days[day].innerHTML = <span class="string">"&lt;a href='</span></span></span><span class="vbscript">&lt;%= config.root %&gt;</span><span class="xml"><span class="undefined"></span></span><span class="vbscript">&lt;%= post.path %&gt;</span><span class="xml"><span class="actionscript"><span class="string">' title='</span></span></span><span class="vbscript">&lt;%= post.title %&gt;</span><span class="xml"><span class="1c">'&gt;<span class="string">" + day + "</span>&lt;/a&gt;<span class="string">";</span></span><br><span class="line">			&#125; </span><br><span class="line">	</span></span><span class="vbscript">&lt;% &#125;); %&gt;</span><span class="xml"><span class="http"></span><br><span class="line"></span><br><span class="line"><span class="openscad">		<span class="comment">//howiefh</span></span><br><span class="line">    &#125;</span><br><span class="line">&#125;);</span><br><span class="line"></span><br><span class="line">$<span class="params">(<span class="string">"idCalendarPre"</span>)</span>.onclick = <span class="function"><span class="keyword">function</span><span class="params">()</span>&#123;</span> cale.PreMonth<span class="params">()</span>; &#125;</span><br><span class="line">$<span class="params">(<span class="string">"idCalendarNext"</span>)</span>.onclick = <span class="function"><span class="keyword">function</span><span class="params">()</span>&#123;</span> cale.NextMonth<span class="params">()</span>; &#125;</span><br><span class="line"></span></span><span class="tag">&lt;/<span class="title">SCRIPT</span>&gt;</span></span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/languages/default.yml:<br><figure class="highlight http"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">calendar</span>: <span class="string">Calendar</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/languages/zh-CN.yml:<br><figure class="highlight http"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">calendar</span>: <span class="string">日历</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/languages/zh-TW.yml:<br><figure class="highlight http"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">calendar</span>: <span class="string">日曆</span></span><br></pre></td></tr></table></figure></p>
<p>引用方法<code>&lt;%= __(&#39;calendar&#39;) %&gt;</code><br>themes/light/layout/_partial/head.ejs:<br><figure class="highlight erb"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"><span class="tag">&lt;<span class="title">SCRIPT</span> <span class="attribute">type</span>=<span class="value">text</span>/<span class="attribute">javascript</span> <span class="attribute">src</span>=<span class="value">"</span></span></span>&lt;%-<span class="ruby"> config.root </span>%&gt;<span class="xml"><span class="tag"><span class="value">js/calendar.js"</span>&gt;</span><span class="undefined"></span><span class="tag">&lt;/<span class="title">SCRIPT</span>&gt;</span></span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/source/css/style.styl:<br><figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="annotation">@import</span> <span class="string">'_partial/calendar'</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/_config.yml<br><figure class="highlight asciidoc"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">widgets: </span><br><span class="line"><span class="bullet">- </span>calendar</span><br></pre></td></tr></table></figure></p>
<h1 id="site_post_使用示例">site post 使用示例</h1><p>post 有哪些项 参照 db.json<br><figure class="highlight vbscript-html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"></span><span class="vbscript">&lt;% site.posts.<span class="keyword">each</span>(<span class="keyword">function</span>(post) &#123; %&gt;</span><span class="xml"></span><br><span class="line">     <span class="tag">&lt;<span class="title">li</span>&gt;</span></span><br><span class="line">       <span class="tag">&lt;<span class="title">a</span> <span class="attribute">href</span>=<span class="value">"</span></span></span><span class="vbscript">&lt;%= config.root %&gt;</span><span class="xml"><span class="tag"><span class="value"></span></span></span><span class="vbscript">&lt;%= post.path %&gt;</span><span class="xml"><span class="tag"><span class="value">"</span>&gt;</span></span><span class="vbscript">&lt;%- (<span class="keyword">new</span> <span class="built_in">Date</span>(post.<span class="built_in">date</span>)).getFullYear() %&gt;</span><span class="xml"></span><span class="vbscript">&lt;%- (<span class="keyword">new</span> <span class="built_in">Date</span>(post.<span class="built_in">date</span>)).getMonth()+<span class="number">1</span> %&gt;</span><span class="xml"></span><span class="vbscript">&lt;%- (<span class="keyword">new</span> <span class="built_in">Date</span>(post.<span class="built_in">date</span>)).getDate() %&gt;</span><span class="xml"></span><span class="vbscript">&lt;%= post.title %&gt;</span><span class="xml"><span class="tag">&lt;/<span class="title">a</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;/<span class="title">li</span>&gt;</span></span><br><span class="line">   </span><span class="vbscript">&lt;% &#125;); %&gt;</span><span class="xml"></span></span><br></pre></td></tr></table></figure></p>
<h1 id="返回顶部">返回顶部</h1><p>themes/light/layout/layout.ejs<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="title">DIV</span> <span class="attribute">style</span>=<span class="value">"DISPLAY: none"</span> <span class="attribute">id</span>=<span class="value">goTopBtn</span> <span class="attribute">title</span>=<span class="value">"Scroll Back to Top"</span>&gt;</span><span class="tag">&lt;<span class="title">IMG</span> <span class="attribute">border</span>=<span class="value">0</span> <span class="attribute">src</span>=<span class="value">"&lt;%- config.root %&gt;images/top.jpg"</span>&gt;</span><span class="tag">&lt;/<span class="title">DIV</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="title">SCRIPT</span> <span class="attribute">type</span>=<span class="value">text</span>/<span class="attribute">javascript</span>&gt;</span><span class="dns">goTopEx()<span class="comment">;</span></span><span class="tag">&lt;/<span class="title">SCRIPT</span>&gt;</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/layout/_partial/head.ejs<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="title">SCRIPT</span> <span class="attribute">type</span>=<span class="value">text</span>/<span class="attribute">javascript</span> <span class="attribute">src</span>=<span class="value">"&lt;%- config.root %&gt;js/scrolltop.js"</span>&gt;</span><span class="undefined"></span><span class="tag">&lt;/<span class="title">SCRIPT</span>&gt;</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/source/js/scrolltop.js<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// JavaScript Document</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">goTopEx</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">	<span class="keyword">var</span> obj=<span class="built_in">document</span>.getElementById(<span class="string">"goTopBtn"</span>);</span><br><span class="line">	<span class="function"><span class="keyword">function</span> <span class="title">getScrollTop</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">		<span class="keyword">return</span> <span class="built_in">document</span>.documentElement.scrollTop+<span class="built_in">document</span>.body.scrollTop;</span><br><span class="line">	&#125;</span><br><span class="line">	<span class="function"><span class="keyword">function</span> <span class="title">setScrollTop</span>(<span class="params">value</span>)</span>&#123;</span><br><span class="line">		<span class="keyword">if</span>(<span class="built_in">document</span>.documentElement.scrollTop)&#123;</span><br><span class="line">			<span class="built_in">document</span>.documentElement.scrollTop=value;</span><br><span class="line">		&#125;<span class="keyword">else</span>&#123;</span><br><span class="line">			<span class="built_in">document</span>.body.scrollTop=value;</span><br><span class="line">		&#125;</span><br><span class="line">	&#125; </span><br><span class="line">	<span class="built_in">window</span>.onscroll=<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;getScrollTop()&gt;<span class="number">0</span>?obj.style.display=<span class="string">""</span>:obj.style.display=<span class="string">"none"</span>;&#125;</span><br><span class="line">	obj.onclick=<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">		<span class="keyword">var</span> goTop=setInterval(scrollMove,<span class="number">10</span>);</span><br><span class="line">		<span class="function"><span class="keyword">function</span> <span class="title">scrollMove</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">			setScrollTop(getScrollTop()/<span class="number">1.1</span>);</span><br><span class="line">			<span class="keyword">if</span>(getScrollTop()&lt;<span class="number">1</span>)clearInterval(goTop);</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>themes/light/source/css/_partial/scrolltop.styl<br><figure class="highlight styl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="id">#goTopBtn</span></span><br><span class="line">  POSITION fixed</span><br><span class="line">  TEXT-ALIGN center</span><br><span class="line">  LINE-HEIGHT <span class="number">30px</span></span><br><span class="line">  WIDTH <span class="number">45px</span></span><br><span class="line">  BOTTOM <span class="number">35px</span></span><br><span class="line">  HEIGHT <span class="number">47px</span></span><br><span class="line">  FONT-SIZE <span class="number">12px</span></span><br><span class="line">  CURSOR pointer</span><br><span class="line">  RIGHT <span class="number">10px</span></span><br><span class="line">  _position absolute</span><br><span class="line">  _right <span class="attribute">auto</span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/source/css/style.styl<br><figure class="highlight styl"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="at_rule">@import</span> <span class="string">'_partial/scrolltop'</span></span><br></pre></td></tr></table></figure></p>
<p><a href="https://github.com/howiefh/howiefh.github.io/tree/source/themes/light/source/images/top.jpg" target="_blank" rel="external">themes/light/source/images/top.jpg</a>把这张图片放在相应目录    </p>
<h1 id="修改header样式">修改header样式</h1><p>themes/light/layout/_partial/article.ejs<br><figure class="highlight applescript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">&lt;<span class="keyword">div</span> <span class="type">class</span>=<span class="string">"date-wrapper"</span>&gt;</span><br><span class="line">	&lt;<span class="keyword">div</span> <span class="type">class</span>=<span class="string">"date-shadow"</span>&gt;&lt;/<span class="keyword">div</span>&gt;</span><br><span class="line">	&lt;<span class="keyword">div</span> <span class="type">class</span>=<span class="string">"date-mask"</span>&gt;&lt;/<span class="keyword">div</span>&gt;</span><br><span class="line">	&lt;<span class="keyword">div</span> <span class="type">class</span>=<span class="string">"dateTitle"</span>&gt;</span><br><span class="line">	  &lt;span <span class="type">class</span>=<span class="string">"d"</span>&gt;&lt;%= <span class="property">item</span>.<span class="type">date</span>.toDate().getDate() %&gt;&lt;/span&gt;</span><br><span class="line">	  &lt;span <span class="type">class</span>=<span class="string">"ym"</span>&gt;&lt;%= <span class="property">item</span>.<span class="type">date</span>.toDate().getMonth() + <span class="number">1</span> %&gt;/&lt;%= <span class="property">item</span>.<span class="type">date</span>.toDate().getFullYear() %&gt;&lt;/span&gt;</span><br><span class="line">	&lt;/<span class="keyword">div</span>&gt;</span><br><span class="line">&lt;/<span class="keyword">div</span>&gt;</span><br></pre></td></tr></table></figure></p>
<p>替换原来的<br><figure class="highlight vbscript-html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"><span class="tag">&lt;<span class="title">div</span> <span class="attribute">class</span>=<span class="value">"icon"</span>&gt;</span><span class="tag">&lt;/<span class="title">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="title">time</span> <span class="attribute">datetime</span>=<span class="value">"</span></span></span><span class="vbscript">&lt;%= item.<span class="built_in">date</span>.toDate().toISOString() %&gt;</span><span class="xml"><span class="tag"><span class="value">"</span>&gt;</span><span class="tag">&lt;<span class="title">a</span> <span class="attribute">href</span>=<span class="value">"</span></span></span><span class="vbscript">&lt;%- config.root %&gt;</span><span class="xml"><span class="tag"><span class="value"></span></span></span><span class="vbscript">&lt;%- item.path %&gt;</span><span class="xml"><span class="tag"><span class="value">"</span>&gt;</span></span><span class="vbscript">&lt;%= item.<span class="built_in">date</span>.format(config.date_format) %&gt;</span><span class="xml"><span class="tag">&lt;/<span class="title">a</span>&gt;</span><span class="tag">&lt;/<span class="title">time</span>&gt;</span></span></span><br></pre></td></tr></table></figure></p>
<p>themes/light/source/css/_partial/article.styl<br><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">header</span></span><br><span class="line">  <span class="class">.date-wrapper</span></span><br><span class="line"> 	  <span class="at_rule">@media</span> screen and (<span class="attribute">max-width</span>: <span class="number">600px</span>)</span><br><span class="line">      <span class="attribute">display</span> <span class="attribute">none</span></span><br><span class="line"></span><br><span class="line">  <span class="class">.dateTitle</span></span><br><span class="line">    <span class="attribute">color</span> <span class="hexcolor">#fff</span></span><br><span class="line">    <span class="attribute">background</span> <span class="hexcolor">#559bc8</span></span><br><span class="line">    <span class="attribute">position</span> absolute</span><br><span class="line">    <span class="attribute">height</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">width</span> <span class="number">80px</span></span><br><span class="line">    <span class="attribute">left</span> -<span class="number">20px</span></span><br><span class="line">    -webkit-<span class="attribute">border-radius</span> <span class="number">6px</span> <span class="number">0</span> <span class="number">0</span> <span class="number">0</span></span><br><span class="line">    <span class="attribute">border-radius</span> <span class="number">6px</span> <span class="number">0</span> <span class="number">0</span> <span class="number">0</span></span><br><span class="line">    <span class="attribute">background-image</span> -<span class="function"><span class="title">webkit-gradient</span><span class="params">(linear, left top, right top, color-stop(<span class="number">0</span>, <span class="hexcolor">#258fb8</span>)</span></span>, <span class="function"><span class="title">color-stop</span><span class="params">(<span class="number">0.2</span>, <span class="hexcolor">#559bc8</span>)</span></span>)</span><br><span class="line">    <span class="attribute">background-image</span> -<span class="function"><span class="title">webkit-linear-gradient</span><span class="params">(left, <span class="hexcolor">#258fb8</span> <span class="number">0</span>, <span class="hexcolor">#559bc8</span> <span class="number">20px</span>)</span></span></span><br><span class="line">    <span class="attribute">background-image</span> -<span class="function"><span class="title">moz-linear-gradient</span><span class="params">(left, <span class="hexcolor">#258fb8</span> <span class="number">0</span>, <span class="hexcolor">#559bc8</span> <span class="number">20px</span>)</span></span></span><br><span class="line">    <span class="attribute">background-image</span> -<span class="function"><span class="title">o-linear-gradient</span><span class="params">(left, <span class="hexcolor">#258fb8</span> <span class="number">0</span>, <span class="hexcolor">#559bc8</span> <span class="number">20px</span>)</span></span></span><br><span class="line">    <span class="attribute">background-image</span> -<span class="function"><span class="title">ms-linear-gradient</span><span class="params">(left, <span class="hexcolor">#258fb8</span> <span class="number">0</span>, <span class="hexcolor">#559bc8</span> <span class="number">20px</span>)</span></span></span><br><span class="line">    <span class="attribute">background-image</span> <span class="function"><span class="title">linear-gradient</span><span class="params">(left, <span class="hexcolor">#258fb8</span> <span class="number">0</span>, <span class="hexcolor">#559bc8</span> <span class="number">20px</span>)</span></span></span><br><span class="line">    <span class="attribute">line-height</span> <span class="number">120%</span></span><br><span class="line">    -webkit-<span class="attribute">box-sizing</span> <span class="attribute">border</span>-box</span><br><span class="line">    -moz-<span class="attribute">box-sizing</span> <span class="attribute">border</span>-box</span><br><span class="line">    <span class="attribute">box-sizing</span> <span class="attribute">border</span>-box</span><br><span class="line">    <span class="attribute">text-align</span> <span class="attribute">right</span></span><br><span class="line">    <span class="attribute">font-size</span> <span class="number">11px</span></span><br><span class="line">    <span class="attribute">font-family</span> <span class="string">"MuseoSlabTumblr"</span></span><br><span class="line">    <span class="class">.d</span></span><br><span class="line">      <span class="attribute">display</span> block</span><br><span class="line">      <span class="attribute">text-align</span> <span class="attribute">right</span></span><br><span class="line">      <span class="attribute">font-size</span> <span class="number">20px</span></span><br><span class="line">      <span class="attribute">padding-top</span> <span class="number">8px</span></span><br><span class="line">      <span class="attribute">padding-right</span> <span class="number">6px</span></span><br><span class="line">      <span class="attribute">text-shadow</span> -<span class="number">1px</span> -<span class="number">1px</span> <span class="number">0</span> <span class="function"><span class="title">rgba</span><span class="params">(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.4</span>)</span></span></span><br><span class="line">    <span class="class">.ym</span></span><br><span class="line">      <span class="attribute">padding-right</span> <span class="number">6px</span></span><br><span class="line">      <span class="attribute">display</span> block</span><br><span class="line">      <span class="attribute">line-height</span> <span class="number">18px</span></span><br><span class="line">      <span class="attribute">text-shadow</span> -<span class="number">1px</span> -<span class="number">1px</span> <span class="number">0</span> <span class="function"><span class="title">rgba</span><span class="params">(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,<span class="number">0.3</span>)</span></span></span><br><span class="line">  <span class="class">.date-shadow</span></span><br><span class="line">    <span class="attribute">background</span> <span class="hexcolor">#258fb8</span></span><br><span class="line">    <span class="attribute">position</span> absolute</span><br><span class="line">    <span class="attribute">height</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">width</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">left</span> -<span class="number">12px</span></span><br><span class="line">    <span class="attribute">top</span> <span class="number">33px</span></span><br><span class="line">    -webkit-<span class="attribute">transform</span> <span class="function"><span class="title">rotate</span><span class="params">(<span class="number">30deg</span>)</span></span></span><br><span class="line">    -moz-<span class="attribute">transform</span> <span class="function"><span class="title">rotate</span><span class="params">(<span class="number">30deg</span>)</span></span></span><br><span class="line">    -o-<span class="attribute">transform</span> <span class="function"><span class="title">rotate</span><span class="params">(<span class="number">30deg</span>)</span></span></span><br><span class="line">    -ms-<span class="attribute">transform</span> <span class="function"><span class="title">rotate</span><span class="params">(<span class="number">30deg</span>)</span></span></span><br><span class="line">    <span class="attribute">transform</span> <span class="function"><span class="title">rotate</span><span class="params">(<span class="number">30deg</span>)</span></span></span><br><span class="line">  <span class="class">.date-mask</span></span><br><span class="line">    <span class="attribute">background</span> <span class="hexcolor">#fff</span></span><br><span class="line">    <span class="attribute">position</span> absolute</span><br><span class="line">    <span class="attribute">height</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">width</span> <span class="number">40px</span></span><br><span class="line">    <span class="attribute">left</span> <span class="number">0</span></span><br><span class="line">    <span class="attribute">top</span> <span class="number">60px</span></span><br></pre></td></tr></table></figure></p>
<p><strong>2014.3.4:</strong></p>
<p>根据<a href="https://github.com/LiuJi-Jim/hexo-theme-light" target="_blank" rel="external">Light-JimLiu</a>修改，增加了多说最新评论模块，Links模块，ABOUT ME模块。修改的文件包括:</p>
<ul>
<li>_config.yml</li>
<li>themes/light/_config.yml</li>
<li>themes/light/languages/default.yml</li>
<li>themes/light/languages/zh-CN.yml</li>
<li>themes/light/languages/zh-TW.yml</li>
<li>themes/light/layout/_partial/comment.ejs</li>
<li>themes/light/layout/_widget/about_me.ejs</li>
<li>themes/light/layout/_widget/calendar.ejs</li>
<li>themes/light/layout/_widget/duoshuo_recent_comments.ejs</li>
<li>themes/light/layout/_widget/links.ejs</li>
<li>themes/light/source/css/_partial/sidebar.styl</li>
<li>themes/light/source/images/okal-eltocat.jpeg</li>
</ul>

      
    </div>
    <footer class="article-footer">
	  
	  <!-- 百度分享 Start -->
	  <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
	  <!-- 百度分享 End -->
	  
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li></ul>

	  
<span>
Updated:<time datetime="2014-12-24T07:44:51.000Z" itemprop="dateModified">2014-12-24</time>
</span>


    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2014/02/07/java-substance/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          使用substance美化java界面并解决乱码问题
        
      </div>
    </a>
  
  
    <a href="/2014/02/03/c-logging-library/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">C语言日志系统库</div>
    </a>
  
</nav>

  
</article>



<!-- 多说评论框 start -->

<section id="comments">
  <div class="ds-thread"  data-thread-key="/2014/02/07/hexo-note/" data-title="hexo后记" data-url="http://howiefh.github.io/2014/02/07/hexo-note/" id="ds_thread">
    <noscript>Please enable JavaScript to view the <a href="//duoshuo.com/?ref_noscript">comments powered by duoshuo.</a></noscript>
  </div>
</section>

<!-- 多说评论框 end -->
</section>
        
          
  <div id="toc" class="toc-aside">
  <h2 class="toc-title">Contents</h2>
    
        <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#设置google_analytics"><span class="toc-number">1.</span> <span class="toc-text">设置google analytics</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#sitemap"><span class="toc-number">2.</span> <span class="toc-text">sitemap</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#rss"><span class="toc-number">3.</span> <span class="toc-text">rss</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#添加菜单"><span class="toc-number">4.</span> <span class="toc-text">添加菜单</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改新建post的框架"><span class="toc-number">5.</span> <span class="toc-text">修改新建post的框架</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改widgets"><span class="toc-number">6.</span> <span class="toc-text">修改widgets</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#创建文件后在编辑器中打开"><span class="toc-number">7.</span> <span class="toc-text">创建文件后在编辑器中打开</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#read_more"><span class="toc-number">8.</span> <span class="toc-text">read more</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#重新部署问题"><span class="toc-number">9.</span> <span class="toc-text">重新部署问题</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#pagination设置"><span class="toc-number">10.</span> <span class="toc-text">pagination设置</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#widget增加日历"><span class="toc-number">11.</span> <span class="toc-text">widget增加日历</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#site_post_使用示例"><span class="toc-number">12.</span> <span class="toc-text">site post 使用示例</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#返回顶部"><span class="toc-number">13.</span> <span class="toc-text">返回顶部</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#修改header样式"><span class="toc-number">14.</span> <span class="toc-text">修改header样式</span></a></li></ol>
    
  </div>

<aside id="sidebar">

  
    
<div class="widget-wrap">
  <h3 class="widget-title">ABOUT ME</h3>
  <ul class="widget about-me">
    
    <li><img class="author" title="About me" src="http://fh-1.qiniudn.com/okal-eltocat.jpg" /></li>
    
    
    <li>Hi,I'm FengHao.</li>
    
    <li>I'll share something interesting and my learning experience with you at this blog.</li>
    
    <li>前博客:<a href="http://hi.baidu.com/idea_star" target="_BLANK">百度空间</a></li>
    
  </ul>
</div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Android/">Android</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Database/">Database</a><span class="category-list-count">13</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/Database/MongoDB/">MongoDB</a><span class="category-list-count">10</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Database/MySQL/">MySQL</a><span class="category-list-count">2</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/Eclipse/">Eclipse</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/FTP/">FTP</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Hexo/">Hexo</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a><span class="category-list-count">20</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/Java/FreeMarker/">FreeMarker</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/Shiro/">Shiro</a><span class="category-list-count">2</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaEE/">JavaEE</a><span class="category-list-count">4</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/JavaEE/Hibernate/">Hibernate</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaEE/JSP/">JSP</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaEE/Spring/">Spring</a><span class="category-list-count">2</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/JavaScript/">JavaScript</a><span class="category-list-count">5</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/JavaScript/jQuery/">jQuery</a><span class="category-list-count">1</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/Linux/">Linux</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/PHP/">PHP</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Suse/">Suse</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Ubuntu/">Ubuntu</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Vim/">Vim</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/编程/">编程</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/软件/">软件</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Android/" style="font-size: 14.75px; color: #65bfa7">Android</a> <a href="/tags/C/" style="font-size: 13.88px; color: #71c1c2">C</a> <a href="/tags/CAS/" style="font-size: 13px; color: #7dc3de">CAS</a> <a href="/tags/Chrome/" style="font-size: 13px; color: #7dc3de">Chrome</a> <a href="/tags/Clean-Code/" style="font-size: 13.88px; color: #71c1c2">Clean Code</a> <a href="/tags/Database/" style="font-size: 13px; color: #7dc3de">Database</a> <a href="/tags/Eclipse/" style="font-size: 13px; color: #7dc3de">Eclipse</a> <a href="/tags/FTP/" style="font-size: 13.88px; color: #71c1c2">FTP</a> <a href="/tags/FreeMarker/" style="font-size: 14.75px; color: #65bfa7">FreeMarker</a> <a href="/tags/Gcc/" style="font-size: 13px; color: #7dc3de">Gcc</a> <a href="/tags/Git/" style="font-size: 14.75px; color: #65bfa7">Git</a> <a href="/tags/Github-Pages/" style="font-size: 13px; color: #7dc3de">Github Pages</a> <a href="/tags/Hexo/" style="font-size: 14.75px; color: #65bfa7">Hexo</a> <a href="/tags/Hibernate/" style="font-size: 13px; color: #7dc3de">Hibernate</a> <a href="/tags/JSP/" style="font-size: 13px; color: #7dc3de">JSP</a> <a href="/tags/JVM/" style="font-size: 14.75px; color: #65bfa7">JVM</a> <a href="/tags/Java/" style="font-size: 14.75px; color: #65bfa7">Java</a> <a href="/tags/JavaMail/" style="font-size: 13px; color: #7dc3de">JavaMail</a> <a href="/tags/JavaScript/" style="font-size: 16.5px; color: #4dbc6f">JavaScript</a> <a href="/tags/Linux/" style="font-size: 13.88px; color: #71c1c2">Linux</a> <a href="/tags/Log/" style="font-size: 13px; color: #7dc3de">Log</a> <a href="/tags/Markdown/" style="font-size: 13.88px; color: #71c1c2">Markdown</a> <a href="/tags/MongoDB/" style="font-size: 20px; color: #1db400">MongoDB</a> <a href="/tags/MySQL/" style="font-size: 13.88px; color: #71c1c2">MySQL</a> <a href="/tags/PHP/" style="font-size: 16.5px; color: #4dbc6f">PHP</a> <a href="/tags/Rhythmbox/" style="font-size: 13px; color: #7dc3de">Rhythmbox</a> <a href="/tags/SSO/" style="font-size: 13px; color: #7dc3de">SSO</a> <a href="/tags/Servlet/" style="font-size: 13px; color: #7dc3de">Servlet</a> <a href="/tags/Shiro/" style="font-size: 13.88px; color: #71c1c2">Shiro</a> <a href="/tags/Spring/" style="font-size: 13.88px; color: #71c1c2">Spring</a> <a href="/tags/Suse/" style="font-size: 13px; color: #7dc3de">Suse</a> <a href="/tags/Thinking-in-Java/" style="font-size: 19.13px; color: #29b61c">Thinking in Java</a> <a href="/tags/Ubuntu/" style="font-size: 17.38px; color: #41ba53">Ubuntu</a> <a href="/tags/Vim/" style="font-size: 18.25px; color: #35b838">Vim</a> <a href="/tags/VirtualBox/" style="font-size: 13px; color: #7dc3de">VirtualBox</a> <a href="/tags/Vsftpd/" style="font-size: 13px; color: #7dc3de">Vsftpd</a> <a href="/tags/jQuery/" style="font-size: 13px; color: #7dc3de">jQuery</a> <a href="/tags/pam-mysql/" style="font-size: 13px; color: #7dc3de">pam_mysql</a> <a href="/tags/小米/" style="font-size: 13px; color: #7dc3de">小米</a> <a href="/tags/软件/" style="font-size: 15.63px; color: #59bd8b">软件</a>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">September 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">August 2015</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/07/">July 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">May 2015</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">April 2015</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/03/">March 2015</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/02/">February 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/12/">December 2014</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/11/">November 2014</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/10/">October 2014</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/09/">September 2014</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/08/">August 2014</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">July 2014</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">June 2014</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/05/">May 2014</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/04/">April 2014</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/03/">March 2014</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/02/">February 2014</a><span class="archive-list-count">11</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/01/">January 2014</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/12/">December 2013</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/11/">November 2013</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/08/">August 2013</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/07/">July 2013</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">June 2013</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/05/">May 2013</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/04/">April 2013</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/03/">March 2012</a><span class="archive-list-count">1</span></li></ul>
    </div>
  </div>


  
    <div class="widget-wrap">
  <h3 class="widget-title">Calendar</h3>
  <div class="widget">
    <div id="g-calendar" class="g-calendar">
        <span class="g-calendar-prev"></span>
		 
        <span class="g-calendar-back"></span>
        <span class="g-calendar-now"></span>
		 
        <span class="g-calendar-next"></span>
        <div class="g-calendar-hd"></div>
        <div class="g-calendar-tit"></div>
        <div class="g-calendar-bd"></div>
    </div>
  </div>
</div>
<script type="text/javascript">
function LGY_calendar(wrapId, options){
    this.oWrap = this.getId(wrapId);
    this.oHead = this.getByClassName('g-calendar-hd',this.oWrap)[0];
    this.oBody = this.getByClassName('g-calendar-bd',this.oWrap)[0];
    this.oTit = this.getByClassName('g-calendar-tit',this.oWrap)[0];
    this.oPrev = this.getByClassName('g-calendar-prev',this.oWrap)[0];
    this.oNext = this.getByClassName('g-calendar-next',this.oWrap)[0];
    this.oNow = this.getByClassName('g-calendar-now',this.oWrap)[0];
    this.oBack = this.getByClassName('g-calendar-back',this.oWrap)[0];
    this.init();
}
LGY_calendar.prototype = {
    ///////////获取ID元素
    getId:function(id){
        return document.getElementById(id);
    },
    ////////获取css类名元素
    getByClassName:function(className,parent){
        var elem = [],
            node = parent != undefined&&parent.nodeType==1?parent.getElementsByTagName('*'):document.getElementsByTagName('*'),
            p = new RegExp("(^|\\s)"+className+"(\\s|$)");
        for(var n=0,i=node.length;n<i;n++){
            if(p.test(node[n].className)){
                elem.push(node[n]);
            }
        }
        return elem;
    },
    //填充日历
    fillDate:function(year,month){
        //本月份第一天是星期几-为显示上个月的天数做铺垫
        var first_day = new Date(year,month,1).getDay(),
        //如果刚好是星期天，则空出一行（显示上个月的天数）
            first_day = first_day == 0?first_day=7:first_day;
        //本月份最后一天是几号
        var final_date = new Date(year,month+1,0).getDate(),
        //上个月的最后一天是几号
            last_date = new Date(year,month,0).getDate(),
        //剩余的格子数--即排在末尾的格子数
            surplus = 42 - first_day - final_date;
        //设置年的链接
        var yearHead = "<a href='/" + "archives/" + year + "/'>" + year + " "+ "</a>"; 
        //设置年的链接
        var monthHead = "";
        var month1 = month + 1;
        if (month1 < 10) {
            monthHead = "<a href='/" + "archives/" + year + "/" + "0" + month1 + "/'>" + " " + month1 + " " + "</a>";
        } else {
            monthHead = "<a href='/" + "archives/" + year + "/" + month1 + "/'>" + " " + month1 + " " + "</a>";
        }
        //设置表头的日历
        this.oHead.innerHTML = yearHead+'年'+monthHead+'月';
        //填充日历执行
        var html = '';
        //上个月的显示天数
        for(var i=0;i<first_day;i++){
            html+='<span class="g-calendar-grey">'+(last_date-(first_day-1)+i)+'</span>';
        }
        //本月的显示天数
        var postdate = new Date("Fri Feb 07 2014 10:15:39 GMT+0800"); 
        if (true && postdate.getFullYear() == year && postdate.getMonth() == month) { 
            html += '<span>1</span><span>2</span><span><a href="/2014/02/03/linux-system-info/" title="当天有2篇博客,第一篇:Linux系统信息">3</a></span><span>4</span><span>5</span><span>6</span><span><a href="/2014/02/07/unable-to-resolve-host/" title="当天有6篇博客,第一篇:无法解读主机名">7</a></span><span><a href="/2014/02/08/gcc-compile-error/" title="当天有2篇博客,第一篇:gcc编译问题">8</a></span><span><a href="/2014/02/09/connot-open-software/" title="解决应用程序打不开">9</a></span><span>10</span><span>11</span><span>12</span><span>13</span><span>14</span><span>15</span><span>16</span><span>17</span><span>18</span><span>19</span><span>20</span><span>21</span><span>22</span><span>23</span><span>24</span><span>25</span><span>26</span><span>27</span><span>28</span><span>29</span><span>30</span><span>31</span>';
        } else {
            for(var j=0;j<final_date;j++){        
                html+='<span id="d'+(j+1)+'">'+(j+1)+'</span>';
            }
        }
        //下个月的显示天数
        for(var k=0;k<surplus;k++){
            html+='<span class="g-calendar-grey">'+(k+1)+'</span>';
        }
        //fill
        this.oBody.innerHTML = html;
        // 当前状态
        if(year==this.c_year&&this.c_month==month){
            this.oBody.getElementsByTagName('span')[first_day+this.date-1].className='g-calendar-on';
        }

        // 对所有文章遍历,然后将有文章的日期加上链接,如果文章太多的话,生成页面会很大,去掉了
        
    },
    // next切换
    next:function(){
        var _that = this;
        this.oNext.onclick = function(){
            _that.month++;
            if(_that.month>11){
                _that.month = 0;
                _that.year++;
            }
            // 填充日历
            _that.fillDate(_that.year,_that.month);
        };
    },
    // back 切换
    back:function(){
        var _that = this;
        if(this.oBack != undefined) {
            this.oBack.onclick = function(){
                var postdate = new Date("Fri Feb 07 2014 10:15:39 GMT+0800"); 
                _that.year = postdate.getFullYear();
                _that.month = postdate.getMonth();
                // 填充日历
                _that.fillDate(_that.year,_that.month);
            };
        }
    },
    // now切换
    now:function(){
        var _that = this;
        if(this.oNow != undefined ) {
            this.oNow.onclick = function(){
                var nowDate = new Date(); 
                _that.year = nowDate.getFullYear();
                _that.month = nowDate.getMonth();
                // 填充日历
                _that.fillDate(_that.year,_that.month);
            };
        }
    },
    // prev切换
    prev:function(){
        var _that = this;
        this.oPrev.onclick = function(){
            _that.month--;
            if(_that.month<0){
                _that.month = 11;
                _that.year--;
            }
            // 填充日历
            _that.fillDate(_that.year,_that.month);
        };
    },
    init:function(){
        this.oTit.innerHTML = '<span>日</span><span>一</span><span>二</span><span>三</span><span>四</span><span>五</span><span>六</span>';
        // 获取今天的日历时间
        var now = new Date();
        this.c_year = this.year = now.getFullYear();
        this.c_month = this.month = now.getMonth();
        this.date = now.getDate();
        // 初始化--填充日历
        this.fillDate(this.year,this.month);
        //next切换
        this.next();
        //prev切换
        this.prev();
        //back 切换
        this.back();
        //now 切换
        this.now();
    }
}
new LGY_calendar('g-calendar');
</script>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2015/09/01/javascript-summary/">JavaScript 总结</a>
          </li>
        
          <li>
            <a href="/2015/08/28/javascript-oop-function-expression-and-async/">JavaScript 面向对象程序设计、函数表达式和异步编程</a>
          </li>
        
          <li>
            <a href="/2015/08/28/javascript-reference-type/">JavaScript 引用类型</a>
          </li>
        
          <li>
            <a href="/2015/08/28/javascript-grammar/">JavaScript 基本语法</a>
          </li>
        
          <li>
            <a href="/2015/08/10/java-web/">Java Web 笔记</a>
          </li>
        
      </ul>
    </div>
  </div>


  
    
<div class="widget-wrap">
  <h3 class="widget-title">Recent Comments</h3>
  <ul class="widget ds-recent-comments" data-num-items="5" data-show-avatars="0" data-show-title="1" data-show-time="1"></ul>
</div>
<!-- 需要多说的公用代码 -->


  

</aside>

        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2015 howiefh<br>
      Powered by <a href="http://zespia.tw/hexo/" target="_blank">Hexo</a> and Theme by <a href="https://github.com/howiefh/hexo-theme-landscape-f" target="_blank" title="Landscape-F">Landscape-F</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<!-- 多说公共JS代码 start (一个网页只需插入一次) -->

<script type="text/javascript">
  var duoshuoQuery = {short_name:"howiefh"};
  (function() {
	var ds = document.createElement('script');
	ds.type = 'text/javascript';ds.async = true;
	ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
	ds.charset = 'UTF-8';
	(document.getElementsByTagName('head')[0] 
		|| document.getElementsByTagName('body')[0]).appendChild(ds);
  })();
</script> 

<!-- 多说公共JS代码 end -->

<!-- 百度分享 start -->

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","douban","bdysc","sqq","qq","hi","baidu","huaban","youdao","sdo","mail","xg","diandian","fx","copy","print"],"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

<!-- 百度分享 end -->

<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="/js/jquery.min.js"></script>
-->
<script src="/js/jquery.min.js" type="text/javascript"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<div class="bottom-btn">

	<a class="icon-gotop" href="javascript:void(0)" title="返回顶部"></a>
	<script src="/js/gotop.js" type="text/javascript"></script>
	<!--
	<script src="/js/gotop.js"></script>
	-->


	<a class="icon-toc-toggle" href="javascript:void(0)" title="文章目录"></a>
	<!--
	<script src="/js/toc_aside_toggle.js"></script>
	-->

</div>
<script src="/js/toc_aside_toggle.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

  </div>
</body>
</html>
